import 'package:flutter_screenutil/screenutil.dart';
import 'package:flutter/material.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/TwoLabelItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/LeftLabelInputItem.dart';
import 'package:heyangkuaidai/DemonStrateModule/Components/NavigationBar.dart';
import 'package:heyangkuaidai/DemonStrateModule/LoanDetailPage.dart';
class LoanRepayPage extends StatefulWidget {
  @override
  _LoanRepayPageState createState() => _LoanRepayPageState();
}

class _LoanRepayPageState extends State<LoanRepayPage> {
  @override
  Widget build(BuildContext context) {
    ScreenUtil.init(context, width: 375, height: 667, allowFontScaling: true);
    return Scaffold(
      resizeToAvoidBottomInset: false,
      body: Column(
        children: [
          SizedBox(height: MediaQuery.of(context).padding.top,),
          NavigationBar(false,title: "贷款还款",),
          Container(
              width: ScreenUtil.screenWidth,
              height: ScreenUtil.screenHeight-ScreenUtil().setWidth(169)-MediaQuery.of(context).padding.top,
              child: ListView(
                padding: EdgeInsets.only(top: 0),
                children: [
                  Stack(
                    children: [
                      Container(
                        width:ScreenUtil.screenWidth,
                        height: ScreenUtil().setWidth(136),
                        child: Image.asset("sources/yy/loanDetailTop.png",),
                      ),
                      Positioned(
                          left: ScreenUtil().setWidth(15),
                          top: ScreenUtil().setWidth(24),
                          child: Container(
                            width: ScreenUtil().setWidth(345),
                            height: ScreenUtil().setWidth(100),
                            color:Colors.white,
                            child: Row(
                              children: [
                                SizedBox(width: ScreenUtil().setWidth(43),),
                                Column(
                                  children: [
                                    SizedBox(height: ScreenUtil().setWidth(27),),
                                    Container(
                                      width: ScreenUtil().setWidth(110),
                                      child:Text("贷款余额（元）",style: TextStyle(fontSize: ScreenUtil().setSp(12),color: Color(0xff999999)),textAlign: TextAlign.left,),
                                    ),
                                    SizedBox(height: ScreenUtil().setWidth(5),),
                                    Container(
                                      width: ScreenUtil().setWidth(110),
                                      child:Text("¥60000.00",style: TextStyle(fontSize: ScreenUtil().setSp(20),),textAlign: TextAlign.left,),
                                    ),
                                  ],
                                ),

                              ],
                            ),
                          )
                      ),
                    ],
                  ),
                  TwoLabelItem(title:"贷款账号" ,hitText:"3401 **** **** *391 9 " ,),
                  TwoLabelItem(title:"还款账号", hitText: "3401 **** **** *391 9",),
                  TwoLabelItem(title:"贷款金额", hitText: "￥31,000,00",),
                  TwoLabelItem(title:"贷款余额", hitText: "￥31,000,00",),
                  TwoLabelItem(title:"贷款利率", hitText: "4.65%",),
                  TwoLabelItem(title:"贷款日期", hitText: "2018-10-23",),
                  TwoLabelItem(title:"应还利息", hitText: "￥31.50",),
                  TwoLabelItem(title:"贷款状态", hitText: "全额发放",),
                  TwoLabelItem(title:"发放网点", hitText: "益阳农商银行",),
                  LeftLabelInputItem(title: "还款金额",hitText: "请输入还款金额",),

                ],
              )
          ) ,
          SizedBox(height: ScreenUtil().setWidth(23),),
          InkWell(
            onTap: (){
               Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) => new LoanDetailPage(),
                  ),
                );
            },
            child: Container(
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(4),
                  color:Color(0xff41A5EE),
                ),
                width: ScreenUtil().setWidth(347),
                height: ScreenUtil().setWidth(44),
                child:Center(
                  child: Text("下一步",style: TextStyle(fontSize: ScreenUtil().setSp(17),color: Colors.white),textAlign: TextAlign.center,),
                )
            ) ,
          )
        ],
      ),
    );
  }
}
